﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SharingCenter.Web.Classes;

namespace SharingCenter.Web.Admin.Learning
{
    public partial class Options : PageBase
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            LinkButton1.Click += new EventHandler(LinkButton1_Click);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txtDefaultMessage.Text = SiteConfig.ReadSetting(SiteConfigSection.Learning, "DefaultProfileComment");
            }
        }

        void LinkButton1_Click(object sender, EventArgs e)
        {
            SiteConfig.WriteSetting(SiteConfigSection.Learning, "DefaultProfileComment", txtDefaultMessage.Text);
            SiteConfig.SubmitChanges();
            SetTopMostMessage("已应用所作的更改。", true);
            RefreshPage();
        }
    }
}
